const hello = (name: string) => console.log(`Hello, ${name}`)

hello('TypeScript')

const a: string = 'foobar'

const arr1: Array<number> = [1,2,3]
const arr2: number[] = [1,2,3]

interface Post{
  title: string
  content: string
  subtitle?:string
  readonly summary: string
}

function printPost(post: Post) {
  // 接口：约定数据结构
}
